<template>
  <div>
    <el-container>
      <el-header class="homeHeader">
        <el-button @click="get"></el-button>
        <div class="title">青岛滨海学院 员工 平台</div>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-menu
              class="el-menu-vertical-demo"
              router>
            <el-sub-menu :index="index"
                         v-for="(item, index) in routes"
                         :key="index"
                         v-show="!item.hidden">
              <template #title>
                <el-icon class="el-icon-location">
                </el-icon>
                <span>{{ item.name }}</span>
              </template>
              <el-menu-item
                  v-for="(children, indexj) in item.children"
                  :key="indexj"
                  :index="children.path"
              >{{ children.name }}
              </el-menu-item>
            </el-sub-menu>
          </el-menu>
        </el-aside>
        <el-main>
          <!-- 主内容区 -->
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import {HomeFilled} from "@element-plus/icons";

export default {
  name: "Home",
  data() {
    return {

    }
  },
  computed: {
    routes() {
      return this.$store.state.routes;
    }
  }
}
</script>

<style lang="less" scoped>
.homeHeader {
  background: #409EFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  box-sizing: border-box;

  .title {
    font-size: 30px;
    font-family: 华文楷体;
    color: aliceblue;
  }
}
</style>
